﻿using System;


namespace HAVNet.Core.Bits
{
    class BitMask
    {
        public bool has (int mask, int val)
        {
            return (mask & val) == val;
        }

        public bool has (uint mask, uint val)
        {
            return (mask & val) == val;
        }

        public bool has (long mask, long val)
        {
            return (mask & val) == val;
        }

        public bool has (ulong mask, ulong val)
        {
            return (mask & val) == val;
        }

        public bool has (short mask, short val)
        {
            return (mask & val) == val;
        }

        public bool has (ushort mask, ushort val)
        {
            return (mask & val) == val;
        }
    }
}
